package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintStream;

public class IOManager {

    private PrintStream printStream;
    private BufferedReader reader;

    public IOManager(PrintStream printStream, BufferedReader bufferedReader) {
        this.printStream = printStream;
        this.reader = bufferedReader;
    }

    public void print(String toPrint) {
        printStream.println(toPrint);
    }

    public String promptUserInput(String prompt) throws IOException {
        printStream.println(prompt);
        return reader.readLine();
    }
}
